<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">

		<title>订单管理</title>

		<link href="/home/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css">
		<link href="/home/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css">

		<link href="/home/css/personal.css" rel="stylesheet" type="text/css">
		<link href="/home/css/orstyle.css" rel="stylesheet" type="text/css">

		<script src="/home/AmazeUI-2.4.2/assets/js/jquery.min.js"></script>
		<script src="/home/AmazeUI-2.4.2/assets/js/amazeui.js"></script>

	</head>

	<body>
		<!--头 -->
		<header>
			<article>
				<div class="mt-logo">
					<!--顶部导航条 -->
					<div class="am-container header">
						<ul class="message-r">
				<div class="topMessage home">
					<div class="menu-hd"><a href="/" target="_top" class="h">商城首页</a></div>
				</div>
				<div class="topMessage my-shangcheng">
					<div class="menu-hd MyShangcheng"><a href="/person" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a></div>
				</div>
				<div class="topMessage mini-cart">
					<div class="menu-hd"><a id="mc-menu-hd" href="/cart" target="_top"><i class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span><strong id="J_MiniCartNum" class="h"></strong></a></div>
				</div>
				<div class="topMessage favorite">
					<div class="menu-hd"><a href="/person/collection" target="_top"><i class="am-icon-heart am-icon-fw"></i><span>收藏夹</span></a></div>
			</ul>
						</div>

						<!--悬浮搜索框-->

						<div class="nav white">
							<div class="logoBig">
								<li><img src="/home/images/logobig.png" /></li>
							</div>

							<div class="search-bar pr">
								<a name="index_none_header_sysc" href="#"></a>
								<form>
									<input id="searchInput" name="index_none_header_sysc" type="text" placeholder="搜索" autocomplete="off">
									<input id="ai-topsearch" class="submit am-btn" value="搜索" index="1" type="submit">
								</form>
							</div>
						</div>

						<div class="clear"></div>
					</div>
				</div>
			</article>
		</header>
            <div class="nav-table">
					   <div class="long-title"><span class="all-goods">全部分类</span></div>
					   <div class="nav-cont">
							<ul>
								<li class="index"><a href="#">首页</a></li>
                                <li class="qc"><a href="#">闪购</a></li>
                                <li class="qc"><a href="#">限时抢</a></li>
                                <li class="qc"><a href="#">团购</a></li>
                                <li class="qc last"><a href="#">大包装</a></li>
							</ul>
						    <div class="nav-extra">
						    	<i class="am-icon-user-secret am-icon-md nav-user"></i><b></b>我的福利
						    	<i class="am-icon-angle-right" style="padding-left: 10px;"></i>
						    </div>
						</div>
			</div>
			<b class="line"></b>
		<div class="center">
			<div class="col-main">
				<div class="main-wrap">

					<div class="user-order">

						<!--标题 -->
						<div class="am-cf am-padding">
							<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">订单管理</strong> / <small>Order</small></div>
						</div>
						<hr/>

						<div class="am-tabs am-tabs-d2 am-margin" data-am-tabs>

							<ul class="am-avg-sm-5 am-tabs-nav am-nav am-nav-tabs">
								<li class="am-active"><a href="#tab1">所有订单</a></li>
								<li><a href="#tab2">待付款</a></li>
								<li><a href="#tab3">待发货</a></li>
								<li><a href="#tab4">待收货</a></li>
								<li><a href="#tab5">待评价</a></li>
							</ul>

							<div class="am-tabs-bd">
								
								<div class="am-tab-panel am-fade am-in am-active" id="tab1">
									<div class="order-top">
										<div class="th th-item">
											<td class="td-inner">商品</td>
										</div>
										<div class="th th-price">
											<td class="td-inner">单价</td>
										</div>
										<div class="th th-number">
											<td class="td-inner">数量</td>
										</div>
										<div class="th th-operation">
											<td class="td-inner">商品操作</td>
										</div>
										<div class="th th-amount">
											<td class="td-inner">合计</td>
										</div>
										<div class="th th-status">
											<td class="td-inner">交易状态</td>
										</div>
										<div class="th th-change">
											<td class="td-inner">交易操作</td>
										</div>
									</div>								
									<div class="order-main">
										<div class="order-list">
											
											<!--交易成功-->
											@foreach($orders as $k=>$v)
											<div class="order-status5">
												<div class="order-title">
													<div class="dd-num">订单编号：<a href="javascript:;">{{$v->onum}}</a></div>
													<span>成交时间：{{date('Y-m-d H:i:s',$v->sendTime)}}</span>
													<!--    <em>店铺：小桔灯</em>-->
												</div>
												<div class="order-content">
													<div class="order-left">
														
														<ul class="item-list">
															<li class="td td-item">
																<div class="item-pic">
																	<a href="/detail/{{$v->goods->id}}" class="J_MakePoint">
																		<img src="{{$v->goods->cover}}" class="itempic J_ItemImg">
														
																</div>
																<div class="item-info">
																	<div class="item-basic-info">
																		<a href="/detail/{{$v->goods->id}}">
																			<p>{{$v->goods->spname}}</p>
																			<p class="info-little">描述：{!!$v->goods->content!!}

																			</p>
																		</a>
																	</div>
																</div>
															</li>
															<li class="td td-price">
																<div class="item-price">
																	{{$v->goods->price}}
																</div>
															</li>
															<li class="td td-number">
																<div class="item-number">
																	<span>×</span>{{$v->counts}}
																</div>
															</li>
															<li class="td td-operation">
																<div class="item-operation">
																	
																</div>
															</li>
														</ul>
														
													</div>
													<div class="order-right">
														<li class="td td-amount">
															<div class="item-amount">
																合计：{{$v->orderMoney}}
															</div>
														</li>
														@if($v->oStatus == 0)
														<div class="move-right">
															<form action="/pay" method="get"> 
															<li class="td td-status">
																<div class="item-status">
																	<p class="Mystatus">等待买家付款</p>
																	<p class="order-info"><a href="orderinfo.html">取消订单</a></p>			
																</div>
															</li>
															<input type="hidden" name="gid" value="{{$v->goods_id}}">
															<input type="hidden" name="num" value="{{$v->counts}}" id="numm">
															<button type="submit">一键支付</button>
															</form>		
														</div>
														@endif
														@if($v->oStatus == 1)
														<div class="move-right">
															<li class="td td-status">
																<div class="item-status">
																	<p class="Mystatus">买家已付款</p>
																	<p class="order-info"><a href="/person/orderinfo/{{$v->id}}">订单详情</a></p>
											
																</div>
															</li>
															<div class="am-btn am-btn-danger anniu tixing">提醒收货</div>
														</div>
														@endif
														@if($v->oStatus == 2)
														<div class="move-right">
															<li class="td td-status">
																<div class="item-status">
																	<p class="Mystatus">待收货</p>
																	<p class="order-info"><a href="/person/orderinfo/{{$v->id}}">订单详情</a></p>
																	<p class="order-info"><a href="/person/orderinfo/{{$v->id}}">查看物流</a></p>
																</div>
															</li>
															<div class="am-btn am-btn-danger anniu shouhuo" value="{{$v->id}}">确认收货</div>
														</div>
														@endif
														@if($v->oStatus == 3)
														<div class="move-right">
															<li class="td td-status">
																<div class="item-status">
																	<p class="Mystatus">待评价</p>
																	<p class="order-info"><a href="/person/orderinfo/{{$v->id}}">订单详情</a></p>
																	<p class="order-info"><a href="/person/orderinfo/{{$v->id}}">查看物流</a></p>
																</div>
															</li>
															<div class="am-btn am-btn-danger anniu">评价商品</div>
														</div>
														@endif
													</div>
												</div>
											</div>	
											@endforeach										
											</div>
										</div>
								</div>
								
								
									<div class="am-tab-panel am-fade" id="tab2">

										<div class="order-top">
											<div class="th th-item">
												<td class="td-inner">商品</td>
											</div>
											<div class="th th-price">
												<td class="td-inner">单价</td>
											</div>
											<div class="th th-number">
												<td class="td-inner">数量</td>
											</div>
											<div class="th th-operation">
												<td class="td-inner">商品操作</td>
											</div>
											<div class="th th-amount">
												<td class="td-inner">合计</td>
											</div>
											<div class="th th-status">
												<td class="td-inner">交易状态</td>
											</div>
											<div class="th th-change">
												<td class="td-inner">交易操作</td>
											</div>
										</div>

										<div class="order-main">
											<div class="order-list">
											@foreach($orders as $k=>$v)
											@if($v->oStatus == 0)
												<div class="order-status1">
													<div class="order-title">
														<div class="dd-num">订单编号：<a href="javascript:;">{{$v->onum}}</a></div>
														<span>成交时间：{{date('Y-m-d H:i:s',$v->sendTime)}}</span>
														<!-- <em>店铺：小桔灯</em> -->
													</div>
													<div class="order-content">
														<div class="order-left">
															
															<ul class="item-list">
																<li class="td td-item">
																	<div class="item-pic">
																		<a href="/detail/{{$v->goods->id}}" class="J_MakePoint">
																			<img src="{{$v->goods->cover}}" class="itempic J_ItemImg">
																		</a>
																	</div>
																	<div class="item-info">
																		<div class="item-basic-info">
																			<a href="/detail/{{$v->goods->id}}">
																				<p>{{$v->goods->spname}}</p>
																				<p class="info-little">描述：{!!$v->goods->content!!}
																				</p>
																			</a>
																		</div>
																	</div>
																</li>
																<li class="td td-price">
																	<div class="item-price">
																		{{$v->goods->price}}
																	</div>
																</li>
																<li class="td td-number">
																	<div class="item-number">
																		<span>×</span>{{$v->counts}}
																	</div>
																</li>
																<li class="td td-operation">
																	<div class="item-operation">
																		
																	</div>
																</li>
															</ul>
															
														</div>
														<div class="order-right">
															<li class="td td-amount">
																<div class="item-amount">
																	合计：{{$v->orderMoney}}
																</div>
															</li>
															<div class="move-right">
																<li class="td td-status">
																	<div class="item-status">
																		<p class="Mystatus">等待买家付款</p>
																	</div>
																</li>
																<li class="td td-change">
																	<form action="/pay" method="get"> 
																	<div class="clearfix tb-btn tb-btn-buy theme-login">
																	<input type="hidden" name="gid" value="{{$v->goods_id}}">
																	<input type="hidden" name="num" value="{{$v->counts}}" id="numm">
																	<button type="submit">立即购买</button>
																	</div>
																	</form>
																</li>
															</div>
														</div>

													</div>
												</div>
											@endif
											@endforeach
											</div>

										</div>
									</div>
									<div class="am-tab-panel am-fade" id="tab3">
										<div class="order-top">
											<div class="th th-item">
												<td class="td-inner">商品</td>
											</div>
											<div class="th th-price">
												<td class="td-inner">单价</td>
											</div>
											<div class="th th-number">
												<td class="td-inner">数量</td>
											</div>
											<div class="th th-operation">
												<td class="td-inner">商品操作</td>
											</div>
											<div class="th th-amount">
												<td class="td-inner">合计</td>
											</div>
											<div class="th th-status">
												<td class="td-inner">交易状态</td>
											</div>
											<div class="th th-change">
												<td class="td-inner">交易操作</td>
											</div>
										</div>

										<div class="order-main">
											<div class="order-list">
											@foreach($orders as $k=>$v)
											@if($v->oStatus == 1)
												<div class="order-status2">
													<div class="order-title">
													<div class="dd-num">订单编号：<a href="javascript:;">{{$v->onum}}</a></div>
													<span>成交时间：{{date('Y-m-d H:i:s',$v->sendTime)}}</span>
													</div>
													<div class="order-content">
														<div class="order-left">
															
															<ul class="item-list">
																<li class="td td-item">
																	<div class="item-pic">
																		<a href="/detail/{{$v->goods->id}}" class="J_MakePoint">
																			<img src="{{$v->goods->cover}}" class="itempic J_ItemImg">
																		</a>
																	</div>
																	<div class="item-info">
																		<div class="item-basic-info">
																			<a href="/detail/{{$v->goods->id}}">
																				<p>{{$v->goods->spname}}</p>
																				<p class="info-little">描述：{!!$v->goods->content!!}
																				</p>
																			</a>
																		</div>
																	</div>
																</li>
																<li class="td td-price">
																	<div class="item-price">
																		{{$v->goods->price}}
																	</div>
																</li>
																<li class="td td-number">
																	<div class="item-number">
																		<span>×</span>{{$v->counts}}
																	</div>
																</li>
																<li class="td td-operation">
																	<div class="item-operation">
																		
																	</div>
																</li>
															</ul>
															
														</div>
														<div class="order-right">
															<li class="td td-amount">
																<div class="item-amount">
																	合计：{{$v->orderMoney}}
																</div>
															</li>
															<div class="move-right">
																<li class="td td-status">
																	<div class="item-status">
																		<p class="Mystatus">买家已付款</p>
																		<p class="order-info"><a href="/person/orderinfo/{{$v->id}}">订单详情</a></p>
																	</div>
																</li>
																<li class="td td-change">
																	<div class="am-btn am-btn-danger anniu tixing">
																		提醒发货</div>
																</li>
															</div>
														</div>
													</div>
												</div>
											@endif
											@endforeach
											</div>
										</div>
									</div>
									<div class="am-tab-panel am-fade" id="tab4">
										<div class="order-top">
											<div class="th th-item">
												<td class="td-inner">商品</td>
											</div>
											<div class="th th-price">
												<td class="td-inner">单价</td>
											</div>
											<div class="th th-number">
												<td class="td-inner">数量</td>
											</div>
											<div class="th th-operation">
												<td class="td-inner">商品操作</td>
											</div>
											<div class="th th-amount">
												<td class="td-inner">合计</td>
											</div>
											<div class="th th-status">
												<td class="td-inner">交易状态</td>
											</div>
											<div class="th th-change">
												<td class="td-inner">交易操作</td>
											</div>
										</div>

										<div class="order-main">
											<div class="order-list">
											@foreach($orders as $k=>$v)
											@if($v->oStatus == 2)
											<div class="order-status3">
													<div class="order-title">
													<div class="dd-num">订单编号：<a href="javascript:;">{{$v->onum}}</a></div>
													<span>成交时间：{{date('Y-m-d H:i:s',$v->sendTime)}}</span>
													<!--    <em>店铺：小桔灯</em>-->
													</div>
													<div class="order-content">
														<div class="order-left">
															<ul class="item-list">
																<li class="td td-item">
																	<div class="item-pic">
																		<a href="/detail/{{$v->goods->id}}" class="J_MakePoint">
																			<img src="{{$v->goods->cover}}" class="itempic J_ItemImg">
																		</a>
																	</div>
																	<div class="item-info">
																		<div class="item-basic-info">
																			<a href="/detail/{{$v->goods->id}}">
																				<p>{{$v->goods->spname}}</p>
																				<p class="info-little">描述：{!!$v->goods->content!!}
																				</p>
																			</a>
																		</div>
																	</div>
																</li>
																<li class="td td-price">
																	<div class="item-price">
																		{{$v->goods->price}}
																	</div>
																</li>
																<li class="td td-number">
																	<div class="item-number">
																		<span>×</span>{{$v->counts}}
																	</div>
																</li>
																<li class="td td-operation">
																	<div class="item-operation">
																		
																	</div>
																</li>
															</ul>
														</div>
														<div class="order-right">
															<li class="td td-amount">
																<div class="item-amount">
																	合计：{{$v->orderMoney}}
																</div>
															</li>
															<div class="move-right">
																<li class="td td-status">
																	<div class="item-status">
																		<p class="Mystatus">待收货</p>
																		<p class="order-info"><a href="/person/orderinfo/{{$v->id}}">订单详情</a></p>
																		<p class="order-info"><a href="/person/orderinfo/{{$v->id}}">查看物流</a></p>
																	</div>
																</li>
																<li class="td td-change">
																	<div class="am-btn am-btn-danger anniu shouhuo" value="{{$v->id}}">
																		确认收货</div>
																</li>
															</div>
														</div>
													</div>
											</div>
											@endif
											@endforeach
											</div>
										</div>
									</div>
									<div class="am-tab-panel am-fade" id="tab5">
										<div class="order-top">
											<div class="th th-item">
												<td class="td-inner">商品</td>
											</div>
											<div class="th th-price">
												<td class="td-inner">单价</td>
											</div>
											<div class="th th-number">
												<td class="td-inner">数量</td>
											</div>
											<div class="th th-operation">
												<td class="td-inner">商品操作</td>
											</div>
											<div class="th th-amount">
												<td class="td-inner">合计</td>
											</div>
											<div class="th th-status">
												<td class="td-inner">交易状态</td>
											</div>
											<div class="th th-change">
												<td class="td-inner">交易操作</td>
											</div>
										</div>

										<div class="order-main">
											<div class="order-list">

											@foreach($orders as $k=>$v)
											@if($v->oStatus == 3)

											<div class="order-status4">
													<div class="order-title">
													<div class="dd-num">订单编号：<a href="javascript:;">{{$v->onum}}</a></div>
													<span>成交时间：{{date('Y-m-d H:i:s',$v->sendTime)}}</span>
													<!--    <em>店铺：小桔灯</em>-->
													</div>
													<div class="order-content">
														<div class="order-left">
															<ul class="item-list">
																<li class="td td-item">
																	<div class="item-pic">
																		<a href="/detail/{{$v->goods->id}}" class="J_MakePoint">
																			<img src="{{$v->goods->cover}}" class="itempic J_ItemImg">
																		</a>
																	</div>
																	<div class="item-info">
																		<div class="item-basic-info">
																			<a href="/detail/{{$v->goods->id}}">
																				<p>{{$v->goods->spname}}</p>
																				<p class="info-little">描述：{!!$v->goods->content!!}
																				</p>
																			</a>
																		</div>
																	</div>
																</li>
																<li class="td td-price">
																	<div class="item-price">
																		{{$v->goods->price}}
																	</div>
																</li>
																<li class="td td-number">
																	<div class="item-number">
																		<span>×</span>{{$v->counts}}
																	</div>
																</li>
																<li class="td td-operation">
																	<div class="item-operation">
																		
																	</div>
																</li>
															</ul>
														</div>
														<div class="order-right">
															<li class="td td-amount">
																<div class="item-amount">
																	合计：{{$v->orderMoney}}
																</div>
															</li>
															<div class="move-right">
																<li class="td td-status">
																	<div class="item-status">
																		<p class="Mystatus">交易成功</p>
																		<p class="order-info"><a href="/person/orderinfo/{{$v->id}}">订单详情</a></p>
																		<p class="order-info"><a href="/person/orderinfo/{{$v->id}}">查看物流</a></p>
																	</div>
																</li>
																<li class="td td-change">
																	<a href="commentlist.html">
																		<div class="am-btn am-btn-danger anniu">
																			评价商品</div>
																	</a>
																</li>
															</div>
														</div>
													</div>
											</div>	
											@endif
											@endforeach
											</div>

										</div>
									</div> 
							</div>
							<div class="right-block col-md-3" style="float:right;">
							</div>
						</div>
					</div>
				</div>
				<script type="text/javascript">
					$('.tixing').click(function(){
						alert('已提醒');
					});
					$('.shouhuo').click(function(){
						var id  = $(this).attr('value');
						var div = $(this).parents('.move-right').find('.td-status').find('.item-status').find('.Mystatus');
						var ziji = $(this);
						$.get('/person/shouhuo/'+id,{},function(data){
							div.html('待评价');
							ziji.html('去评价');
						});
					});
				</script>
				<!--底部-->
				<div class="footer">
					<div class="footer-hd">
						<p>
							<a href="#">恒望科技</a>
							<b>|</b>
							<a href="#">商城首页</a>
							<b>|</b>
							<a href="#">支付宝</a>
							<b>|</b>
							<a href="#">物流</a>
						</p>
					</div>
					<div class="footer-bd">
						<p>
							<a href="#">关于恒望</a>
							<a href="#">合作伙伴</a>
							<a href="#">联系我们</a>
							<a href="#">网站地图</a>
							<em>© 2015-2025 Hengwang.com 版权所有</em>
						</p>
					</div>

				</div>
			</div>
			<aside class="menu">
				<ul>
					<li class="person active">
						<a href="/person">个人中心</a>
					</li>
					<li class="person">
						<a href="/person">个人资料</a>
						<ul>
							<li> <a href="/person/info">个人信息</a></li>
							<li> <a href="/person/safe">安全设置</a></li>
							<li> <a href="/person/address">收货地址</a></li>
						</ul>
					</li>
					<li class="person">
						<a href="#">我的交易</a>
						<ul>
							<li><a href="/person/order">订单管理</a></li>
							<li> <a href="/person/change">退款售后</a></li>
						</ul>
					</li>
					<li class="person">
						<a href="#">我的资产</a>
						<ul>
							<li> <a href="/person/coupon">优惠券 </a></li>
							<li> <a href="/person/bonus">红包</a></li>
							<li> <a href="/person/bill">账单明细</a></li>
						</ul>
					</li>

					<li class="person">
						<a href="#">我的小窝</a>
						<ul>
							<li> <a href="/person/collection">收藏</a></li>
							<li> <a href="/person/foot">足迹</a></li>
							<li> <a href="/person/comment">评价</a></li>
							<li> <a href="/person/news">消息</a></li>
						</ul>
					</li>

				</ul>

			</aside>
		</div>

	</body>

</html>
